import { ApiProperty } from "@nestjs/swagger";
import { IsNotEmpty } from "class-validator";

export class CreateAuthorityDto {
    @ApiProperty({
        description: '路径',
    })
    @IsNotEmpty()
    path: string;

    @ApiProperty({
        description: '图标',
    })
    @IsNotEmpty()
    icon: string;

    @ApiProperty({
        description: '名称',
    })
    @IsNotEmpty()
    name: string;

    @ApiProperty({
        description: 'key',
    })
    @IsNotEmpty()
    key: string;

    @ApiProperty({
        description: '组件',
    })
    @IsNotEmpty()
    component: string;

    @ApiProperty({
        description: '父路由id',
    })
    @IsNotEmpty()
    parentId: string;
}


export class AssignAuthorityDto {
    @ApiProperty({
        description: '权限id',
    })
    @IsNotEmpty()
    authorityId: string;

    @ApiProperty({
        description: '角色id',
    })
    @IsNotEmpty()
    roleId: string;
}